how to use required_with in laravel to array element

95

validate each value from array laravel -

$validator = Validator::make($request->all(), [
    "names"    => "required|array|min:3",
    "names.*"  => "required|string|distinct|min:3",
]);

Comments

Submit
0 Comments